
/**********************************************************************
***********************************************************************
* FILE		: bsp.c
* Description	: 
*			  
* Copyright (c) 2012 by BTCS. All Rights Reserved.
* 
* History:
* Version		Name       		Date			Description
   0.1		AlexZhang	2012/12/29	Initial Version
   
***********************************************************************
**********************************************************************/



#include "includes.h"

#define CD4052A TRISCbits.TRISC1 = 0
#define CD4052B TRISFbits.TRISF6 = 0

#define CD4052AOnOff PORTCbits.RC1
#define CD4052BOnOff PORTFbits.RF6


void xConfigUSART1(eBSPUSART1 type)
{
    CD4052A;
    CD4052B;
    if(type == RS2321)
        {
        CD4052AOnOff = 0;
        CD4052BOnOff = 1;
        }
    else if(type == RS2322)
        {
        CD4052AOnOff = 1;
        CD4052BOnOff = 0;
        }
    else if(type == RS485)
        {
        CD4052AOnOff = 0;
        CD4052BOnOff = 0;
        }
}